<?php
require str_replace('test', 'src', dirname(__FILE__)) . '/Douban.php';
class Services_DoubanTest extends PHPUnit_Framework_TestCase
{
    private $douban;

    public function setUp()
    {
        $app_conf = array(
            'api_key' => 'foo',
            'secret' => 'asdf',
            'redirect_uri' => 'http://example.com',
        );
        $this->douban = new Services_Douban($app_conf);
    }

    public function testGetMe()
    {
        $r = $this->douban->getMe();
        var_dump($r);
        $this->assertEquals('', $r);
    }

    public function testGetToken()
    {
        $code = 'qwer';
        $r = $this->douban->getToken($code);
        var_dump($r);
        $this->assertEquals('', $r);
    }
}
?>
